FIELD OF THE INVENTION
The present invention relates to encoding and decoding method and apparatus of image data for compressing continuous image data and decompressing an image from the compressed data and, more particularly, to encoding and decoding method and apparatus of image data in which each of a plurality of images is divided into blocks each comprising a plurality of pixels and the pixels in the block are orthogonal transformed and encoded.
In order to accumulate or transmit at a high speed with a high quality image data whose information amount is much larger than that of numerical value data, particularly, data such as half tone image or color image, it is necessary to efficiently encode a gradation value of each pixel. As a high efficient compressing method of image data, for example, there is an adaptive discrete cosine transforming (hereinafter, referred to as an ADCT) method. According to the ADCT, an image is divided into blocks each comprising (8.times.8) pixels and the pixel signals of each block are transformed into DCT coefficients of a space frequency distribution by a two-dimensional discrete cosine transformation (hereinafter, referred to as a DCT). Subsequently, the DCT coefficients are quantized by a threshold value which is adapted to an eyesight and the quantized DCT coefficients obtained are encoded by a Huffman table which was statistically obtained.
Hitherto, according to the encoding of a moving image, although a compression ratio that is higher than that by the encoding of a still image is obtained, there are contrarily drawbacks such as large circuit scale, low picture quality, high costs, and the like. Encoding and decoding method and apparatus of image data, which can solve the above problems, have already been proposed (Japanese Patent Application No. 77,957/1992). FIG. 1 shows an encoder which has been proposed by the present inventors et al. of the present invention. Image data, which is obtained by cutting and extracting images of one frame as a target to be encoded on a block unit basis of total 64 pixels [(eight pixels in the vertical direction).times.(eight pixels in the lateral direction)], is input to an input terminal 200. The images which were encoded up to the previous frame have been held as reference images in a reference frame holding section 204. An effective block discriminating section 206 compares the image data from the input terminal and image data of a reference image existing at the same block position. When there is a change, the block is determined to be an effective block. When there is no change, the block is determined to be an invalid block. An encoding section 202 performs the encoding to only the effective block which was judged as a block having a change by the effective block discriminating section 206, and adds block information indicative of the presence or absence of an effective block to the image data and transmits from an output terminal 210. That is, with respect to a continuous moving image, when comparing the image of the present frame and the image of the previous frame, a moving image region having a change and a still image region having no change exist. In this instance, only the moving image region having a change is encoded in accordance with an encoding algorithm of a still image. The encoded data is transmitted together with block information indicative of the block position of the change region.
FIG. 2 shows an apparatus for decoding a continuous moving image from the data sent from the encoder. Input data from an input terminal 212 is input to a code separating section 214, by which it is separated into block information and encoded data. A decoding section 216 decodes the image on a block unit basis from the encoded data. In this instance, since the block information indicative of the positions of the effective blocks has been given to an address generating section 218, address signals indicative of the block positions of the decoded image are generated on a pixel unit basis. The pixel signals of the relevant block in a decoded image holding section 220 are rewritten and updated in accordance with the address signals. By executing such encoding and decoding processes, a high compression ratio and a high picture quality can be obtained in accordance with simple encoding algorithm and decoding algorithm of a still image.
In the apparatus of FIG. 1, whether the block is an effective block or an invalid block is judged by a correlation between the image of the present frame which is at present a target to be processed and a reference frame image and all of the effective blocks of one frame are encoded. However, there is considered a case where a code amount is too large in dependence on a transmission path and a satisfactory number of transmission images per unit time cannot be obtained.
In case of transmitting image data through a communication network such as an ISDN (Integrated Services Digital Network) or the like, generally, a proper code rate to decide a code amount which can be output per frame by an encoder is previously decided in consideration of the maximum transfer speed or the like of the communication network. In case of storing the encoded data to a memory medium, such a code rate is decided in consideration of a memory capacity of the memory medium. For example, assuming that the maximum transfer speed of the communication network is equal to 64,000 bps and a moving image such that one byte consists of eight bits and 30 frames are displayed per second is transmitted, the code rate is ##EQU1## Therefore, when a code amount of one frame is equal to or less than 267 bytes, a moving image of 30 frames per second can be transmitted. Therefore, the optimum code rate (code amount of one frame) is set to a value of 267 bytes or less, for example, 260 bytes. However, in dependence on a transmission path, there is considered a case where when the effective blocks of one frame are encoded, a code amount is too large and a transfer speed which enables the moving image of 30 frames per second to be transmitted cannot be assured and a satisfactory number of transmission frames cannot be obtained. Even in case of a transmission path which enables the moving image of 30 frames per second to be transmitted, there is a problem such that in the case where what is called a sudden frame such that a change region of an image suddenly increases and the number of transmission frames decreases occurs, the number of decoding frames per unit time temporarily decreases, so that a motion of the decoded image is not smooth or the like.